home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
090
/
drlock.arc
/
DRLOCK.DOC
next >
Wrap
Text File
|
1988-06-22
|
14KB
|
349 lines
DRLOCK
version 0.1 (c) copy right 1988 All Rights Reserved
This is a simple security program to turn on/off diskette access to
drive A: or B:, as well as to the hard disk of AT, XT 286 and PS/2. You can
independently allow read, write or format to each and change it as needed
from a pop up menu. The pop up menu itself can be protected by a password
security code and the number of tries you are allowed to try the pass can be
set at various values as well. This program can be wiped from memory, along
with any other program ran after this to allow big programs as much space as
possible. OR, this program can be locked to prevent you from removing this
program. Whether you wipe this out or if it's locked, the program will tell
you what time this program was originally ran. When you first run this
program, this program will also tell you the time this program first became
memory resident, so by comparing the two, you can tell if someone has
tampered with your computer by turning the computer off, also.
This program intercepts the disk BIOS interrupt 13h. Any disk system
which does not use this will not be affected. The PS/2 read and write uses
the interrupt 13h for disk read and write, but when formatting the hard disk,
the format.com uses interrupt 21h function 440dh major code 8, minor code 42h
for format and verify track on a logical device on the hard disk. This is
intercepted and checked if the default drive or drive C:. If either the
default or C: and the HD format is turned off, then format.com will abort
with the message
Attempted write-protected violation
Format failure
Format another (Y/N)?
The presence of a PS/2 is checked with the system services interrupt 15h
(formerly the cassette interrupt) function 0c0h for 'return system
configuration parameters'.
This program was tested on a PS/2 with a hard disk and an XT without a
hard disk running on the latest DOS 3.3 and was found to work without any
trouble. If you are not sure that this program will work for your particular
machine, assume that only the read/write features can be turned on or off and
assume that the format cannot be turned off and try this out as an experiment.
This program is designed to work on CGA, EGA, monochome or VGA in either
the 80 column wide mode or the 40 column wide mode.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
If you simply type
DRLOCK
then you get the help screen only.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
To run this, simply type
DRLOCK RUN
and end it with an <ENTER> or <ntr> or <cr> or anything else you want to call
the carriage return. Just the letter 'r' in 'run' will work also. The <alt>
and 'M' will pop up the menu.
You can load any other program AFTER the DRLOCK to be removed along with
DRLOCK, provided that the other programs have my name mentioned somewhere or
it mentions that this program will wipe out that particular program also. Do
not run any other memory resident program after DRLOCK if not made by this
group or specifically mentions that DRLOCK will wipe out that software also.
With the default above, there is no need to type a password to pop up
the pop up menu. All drives will allow read/write/format. The program can
be wiped from memory, and a chirping sound will be generated when you try to
access a drive whose feature (read/write/format) is turned off.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
To lock this program so that it will not come out of memory, type
DRLOCK L
If you have other commands entered at this command line, it is a good
practice to separate the commands with at least one space. There is no need
to enter the Run command in this case. If you enter the Run command,
everything afterwards is ignored.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
To prevent the chirping sound (No-sound) when your program tries to use
a feature which is turned off, type
DRLOCK N
In this case, you do not have to type the 'R' parameter to run this.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
To wipe this program and any other program ran after this from memory,
DRLOCK W
And DRLOCK will tell you what time it was ran. If the time does not
match the time you noted as the first time you ran DRLOCK, then someone
turned off the computer and played around with it.
NOTE: A version of MSPOOL which was originally uploaded to CompuServe cannot
remove this program. A corrected version should be present at this time.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
To disallow write/format to drive B: and disallow write to the hard
disk, type
DRLOCK BWF HW
The letters BWF stands for 'drive B: do not allow Write/Format.
The letters HW stands for 'Hard disk: do not allow Write.
You do not have to specify the 'R'un parameter since the presence of any
parameter other than 'W'ipe indicates that you want to run this program.
Similarly, to disallow for drive A: or C:, follow the drive letter with
the letters RWF for Read, Write or Format. The letters may be in capital or
small letters in any order but must NOT be separated from the drive letter
with any space or tab. In other words, DRLOCK B R will not disallow Read
for drive B: when you first run DRLOCK because of the space separating 'B'
for drive B:. And 'R' will be interpreted as the end of this command line
and taken as meaning 'R'un.
The accesses allowed may be changed later using the pop up menu.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
To prevent the pop up menu from popping up unless you know the password,
type
DRLOCK Ppassword
All letters after the letter 'p' until a space, tab or the end of a line
will be taken as the password. Although the letter 'P' to indicate the next
line to follow can be in capitals or small letters, the password itself must
match each capital or small letter you type at the pop up prompt. So if your
password is 'Cathy', then using 'cathy' or 'cAthy' at the pop up prompt for a
pass will not work. The password may be up to 78 characters long, including
any character from chr$(33) through chr$(255).
If you literally type
drlock pcAThy
to run DRLOCK, then when the prompt to enter the password appears, you must
literally type the 'cAThy' as is to access the pop up menu to change the
accesses.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
When a feature which is not allowed is detected, DRLOCK sets a carry
flag and returns an error condition in the AH register back to the operating
system or the program which tried to access a feature such as read/write/
format which was not allowed at the time. For read request, the default is
to set the time-out error to say that the disk drive failed to respond only.
For write and format, the default is the set the write protected error. To
change the read error status returned in the AH register to 'bad command
passed to diskette i/o', type
DRLOCK !1
To change the write error status to 'time-out', type
DRLOCK @128
To change the format error status to 'time-out' and 'bad-command', type
DRLOCK #129
The values which can be combined with each are the following:
time-out 128 disk drive did not respond at all
bad-seek 64 disk head did not seek to requested area
bad-nec 32 the NEC disk controller failed
bad-crc 16 cyclic redundancy check error
dma-boundary 9 tried to access over 64kb of space
dma-bad 8 direct-memory-access overrun
no-such-record 4 sector requested did not exist
write-protected 3 disk is write protected
bad-adr-marker 2 no address marker found
bad-command 1 incorrect command was sent to disk drive
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
If a password is required, then you are given a default of three times
to type the proper password. To change the number of tries allowed to 2,
type
DRLOCK T2
The default is to allow three tries.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
PROMPTS AND MESSAGES
=-=-=
DRLOCK: Enter password or <esc>
=-=-=
When the pop up menu is protected, this message will appear to ask you
to enter the password. End the password with a carriage return or type the
escape key to get out any time.
|--------------------------------------|
|A: read write format cursor |
|B: read write format and <ENTER> to |
|C: read write format change setting |
|HD read write format <ESC> exits |
|v-0.1-DrMS&ASSOC----------------------|
This is roughly what the pop up will look like when you turn it on.
Move the cursor up/down/left/right to the desired feature and then press on
the carriage return. If the cursor is on the first 'read' when you do, then
the word 'read' will disappear from the drive A: row and you will be left
with
|--------------------------------------|
|A: write format cursor |
|B: read write format and <ENTER> to |
|C: read write format change setting |
|HD read write format <ESC> exits |
|v-0.1-DrMS&ASSOC----------------------|
Now, any attempt to read the diskette in drive A: will be intercepted
and a chirping sound will be made to tell you that nothing actually happened.
This program will not intercept a RAM drive configured as drive C: if it does
not use the standard BIOS to access the diskette drive.
Similarly, moving the cursor to the HD (hard disk) line and pressing
down on the carriage return once at the 'read' feature will disallow reading
the hard disk. Press down on the carriage return once more to allow reading
the hard disk.
=-=-=
Sorry, I cannot remove DRLOCK because it is not in memory
=-=-=
If you tried to wipe DRLOCK from memory when you did not have one in
memory, then you get this message.
=-=-=
You don't have to do it, DRLOCK is already in memory
=-=-=
If you tried to run DRLOCK when DRLOCK was already in memory, then you
get this message.
=-=-=
Internal memory organization is destroyed !!!
I recommend that you warm reBOOT WITH THE CTL-ALT-DEL key combination
as soon as possible since the behavior of the machine is no longer
predictable. Do not ignore this error message!
=-=-=
You will get this long message if you tried to wipe DRLOCK from memory
and something unexpected happened. This can happen often if you were running
BASIC to poke values into memory without checking to see if you are allowed
to do so by consulting with DOS. DRLOCK itself consults with DOS and should
not by itself cause this error.
=-=-=
DRLOCK was run at ...........
If the "run time" displayed at wipe out time does not match this,
then someone has turned off the machine and tampered with it.
Note the time on a piece of paper and carry it with you.
=-=-=
This message appears when you first make DRLOCK memory resident. Note
the time somewhere and check the time against the time displayed when you
wipe or at least try to wipe DRLOCK from memory. If the two times do not
match exactly, then it implies that someone turned off your machine and did
something with it.
The time is given in the 24 hour format such that 23:12:45.00 is 45
seconds past 11:12 PM with the '.00' representing the 1/100 th of a second.
Some clones may consistently give '.00' for the 1/100 th of a second.
=-=-=
This was turned on at ...........
This is locked and cannot be wiped from memory
=-=-=
If you try to wipe DRLOCK from memory but DRLOCK was locked with the 'L'
parameter, you get this message. This can be defeated by turning off the
machine and running the program over again, but anyone who does will have to
change the time, match it exactly and go through a few other time consuming
steps to try to fool you. If you had a password to pop up the menu, and it
no longer pops up, then you know that someone was playing with your machine.
=-=-=
Run time was ...........
Wipe time was ...........
=-=-=
If DRLOCK was not locked and can come out of memory, then you get this
message.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
All products and names mentioned are Trademarks or Registered Trademarks of
their respective corporations or companies.
All enclosed programs, documents and other files are provided AS IS, without
any warranty, expressed or implied, including but not limited to fitness for
a particular purpose.
A contribution of $10 US/Canadian is appreciated if you find this useful, or
$20 for an improved one which wipes out any and all programs (not just mine
or associate(s)) loaded after this, among other features. (This later uses
more memory, of course)
Your negative criticisms are also welcome.
P.S. The program keeps track of when the first 100 attempts to access the
password happened at, but this version does not display the times.
Dr. Masaaki Sawada & Assoc.
University of Waterloo, Faculty of Science
Waterloo, Ontario Canada N2L 3G1
No school time nor equipments were used in producing this program and
documentation.